'use strict';
// Copyright 2014 Blueant Inc. All Rights Reserved.
/**
 * @fileoverview 获取攻击类型获取攻击力
 * @author sundbcn@gmail.com (sun debing)
 */

var atkType = require('../../consts/atkType');

exports.getAttr = function (atk_type, value) {
    var attr = {
        min_atk: 0,
        max_atk: 0,
        fire_damage: 0,
        ice_damage: 0,
        light_damage: 0,
        city_damage: 0
    };
    switch (atk_type) {
    case atkType.ATK_PHYSICAL:
        {
            attr.min_atk = value;
            attr.max_atk = value;
            break;
        }
    case atkType.ATK_ICE:
        {
            attr.ice_damage = value;
            break;
        }
    case atkType.ATK_FIRE:
        {
            attr.fire_damage = value;
            break;
        }
    case atkType.ATK_LIGHT:
        {
            attr.light_damage = value;
            break;
        }
    case atkType.ATK_CITY:
        {
            attr.city_damage = value;
            break;
        }
    default:
        {
            console.error('atk type can not found:' + atk_type);
        }
    }
    return attr;
};
